package cb.wzby;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class ListDemo4 {
    public static void main(String[] args) {
        //消除重复
        List<Integer> l = new ArrayList<>(List.of(1,1,1,2,2,2,3,3,3,8,8));
        System.out.println(l);
        Set<Integer> s = new HashSet<>(l);
        System.out.println(s);

    }
}
